#
# @lc app=leetcode.cn id=1480 lang=python
#
# [1480] 一维数组的动态和
#

# @lc code=start
class Solution(object):
    def runningSum(self, nums):
        """
        :type nums: List[int]
        :rtype: List[int]
        """
        pre_sum = []
        for num in nums:
            pre_sum.append(pre_sum[-1] + num if pre_sum else num)
        return pre_sum
# @lc code=end

